﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Customer.aspx.cs" Inherits="Main_Master_Customer_Customer" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Customer</title>
    <link href="../../../Styles/accounts.css" rel="Stylesheet" type="text/css" />
    <%--<script src="../../../Menu/js/jquery.min.js" type="text/javascript"></script>--%>
    <script src="../../../JavaScript/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="../../../JavaScript/Commons.js" type="text/javascript"></script>
    <link href="../../../Styles/HorizontalTab.css" rel="stylesheet" type="text/css" />
    <script src="../../../JavaScript/HorizontalTab.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function GetTextBoxValue(control_id) {
            var num = document.getElementById(control_id).value;
            var num1 = new Number(num);
            document.getElementById("TxtClosing").value = num1.toFixed(2);
        }
        function GetTextBoxValue1(control_id) {
            document.getElementById("txtAddName").value = document.getElementById(control_id).value;
        }
        function SetZero(control_id) {
            var num = document.getElementById(control_id).value;
            var num1 = new Number(num);
            document.getElementById(control_id).value = num1.toFixed(2);
            var e = document.getElementById("DDLServices");
            var check = e.options[e.selectedIndex].value;
            if (check == '0') {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Dr";
            }
            else {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Cr";
            }
        }
        function setDebitCredit() {
            var num = document.getElementById("TxtOpeningBal").value;
            var num1 = new Number(num);
            var e = document.getElementById("DDLServices");
            var check = e.options[e.selectedIndex].value;
            if (check == '0') {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Dr";
            }
            else {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Cr";
            }
        }
        function selectaddress() {
            var chkadd = document.getElementById("chk");
            if (chkadd.checked == true) {
                document.getElementById("txtDileveryName").value = document.getElementById("txtAddName").value;
                document.getElementById("txtDileveryAddress1").value = document.getElementById("txtAddress1").value;
                document.getElementById("txtDileveryAddress2").value = document.getElementById("txtAddress2").value;
                document.getElementById("txtDileveryAddress3").value = document.getElementById("txtAddress3").value;
                document.getElementById("TxtDileveryPlace").value = document.getElementById("txtAddPlace").value;
                document.getElementById("txtDileveryPincode").value = document.getElementById("txtPin").value;

                document.getElementById("TxtDileveryPhone").value = document.getElementById("txtPhone").value;
                document.getElementById("TxtDileveryFax").value = document.getElementById("txtFax").value;

                document.getElementById("DDLDileveryName").selectedIndex = document.getElementById("ddlname").selectedIndex;
                document.getElementById("DDLDileveryState").selectedIndex = document.getElementById("ddlState").selectedIndex;
                document.getElementById("DDLDileveryCountry").selectedIndex = document.getElementById("ddlCountry").selectedIndex;


            }
            else if (chkadd.checked == false) {
                document.getElementById("txtDileveryName").value = '';
                document.getElementById("DDLDileveryName").value = '';
                document.getElementById("TxtDileveryPhone").value = '';
                document.getElementById("TxtDileveryPlace").value = '';
                document.getElementById("TxtDileveryFax").value = '';
                document.getElementById("txtDileveryPincode").value = '';
                document.getElementById("DDLDileveryState").value = '';
                document.getElementById("DDLDileveryCountry").value = '';
                document.getElementById("txtDileveryAddress1").value = '';
                document.getElementById("txtDileveryAddress2").value = '';
                document.getElementById("txtDileveryAddress3").value = '';
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true">
        </asp:ScriptManager>
        <asp:UpdateProgress DynamicLayout="false" ID="UpdProgress" runat="server">
            <ProgressTemplate>
                <div align="center">
                    <img src="../../../Images/ajax-loader.gif" />
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <div class="divmain">
            <acc:heading ID="header1" runat="server" HeadingText="Customer" />
        </div>
        <asp:Panel ID="PnlAddNew" runat="server" Visible="false">
            <div style="text-align: center; width: 100%;">
                <asp:Label ID="lblMsg" runat="server" Font-Bold="true"></asp:Label>
            </div>
            <div>
            <table class="tablecontentnoborder" style=" float:left; width: 70%; margin-left: 5%; padding: 0px; border: 1px solid #818181;">
                <tr>
                    <td class="headtd" colspan="2">
                        Customer Details
                    </td>
                </tr>
                <tr>
                    <td>
                        Name <span class="required">*</span>
                    </td>
                    <td>
                        <asp:TextBox ID="TxtName" runat="server" CssClass="input" ToolTip="Enter Name" AutoCompleteType="Disabled"
                            onKeyUp="return GetTextBoxValue1(this.id)" ValidationGroup="V"></asp:TextBox>
                        <asp:CheckBox ID="CHKAvtive" runat="server" Text="Active" Checked="True" />
                        <asp:RequiredFieldValidator ID="RFVName" runat="server" ControlToValidate="TxtName"
                            ErrorMessage="Provide Name" ValidationGroup="V" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Alternate Name &nbsp; &nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="TxtAlterName" runat="server" ToolTip="Enter Alternate Name" CssClass="input"></asp:TextBox>&nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        Group Name <span class="required">*</span>
                    </td>
                    <td>
                        <asp:DropDownList ID="DDLGroupName" runat="server" Width="240" AutoPostBack="true">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        Opening Balance
                    </td>
                    <td>
                        <asp:TextBox ID="TxtOpeningBal" runat="server" ToolTip="Opening Balance" CssClass="inputnumber"
                            Text="0.00" onKeyPress="return isNumberKey(this.id,event)" onKeyUp="GetTextBoxValue(this.id)"
                            onBlur="SetZero(this.id)"></asp:TextBox>
                        <asp:DropDownList ID="DDLServices" runat="server" AutoPostBack="true" onChange="return setDebitCredit()">
                        </asp:DropDownList>
                        <asp:CheckBox ID="CHKBillWise" runat="server" Text="Apply Billwise" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Closing Balance
                    </td>
                    <td>
                        <asp:TextBox ID="TxtClosing" ToolTip="Closing Balance" runat="server" CssClass="inputnumber"
                            ReadOnly="false" onKeyPress="return isNumberKey(this.id,event)" Enabled="false"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        &nbsp; &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        &nbsp;
                    </td>
                </tr>
            </table>
            <table style=" width="10%">
                <tr>
                    <td>
                        <asp:Button ID="BtnSave" Text="Save" runat="server" CssClass="button" ValidationGroup="V"
                            OnClick="BtnSave_Click" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="BtnClose" runat="server" Text="Close" CssClass="button" OnClick="BtnClose_Click" />
                    </td>
                </tr>
            </table>
            </div>
            <br /><br /><br /><br /><br /><br /><br /><br />
            <div id="wrapper">
                <ul class="tabs">
                    <li><a href="javascript:void(0)" class="defaulttab" rel="TabAddress">Address</a></li>
                    <%--<li><a href="javascript:void(0)"  rel="tabtaxdetails">Tax Details</a></li>--%>
                    <%--<li><a href="javascript:void(0)" rel="TabDeliveryAdress">Delivery Address</a></li>--%>
                    <li><a href="javascript:void(0)" rel="ContactsTabs">Contacts</a></li>
                    <li><a href="javascript:void(0)" rel="TabRegistrations1">Registrations</a></li>
                    <%--<li><a href="javascript:void(0)" rel="TabOtherDetails">Other Details</a></li>--%>
                    <%--<li><a href="javascript:void(0)" rel="TabTermsCondition">Terms & Condition</a></li>--%>
                </ul>
                <div class="tab-content" id="tabtaxdetails" runat="server">
                    <div style="margin-left: 20px; margin-top: 15px; width: 90%">
                        <table class="tablecontent" style="width: 100%">
                            <tr>
                                <td class="headtd" colspan="2">
                                    Tax Details
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox ID="ChkTDS" runat="server" Text="TDS Applicable" />
                                </td>
                                <td>
                                    <asp:CheckBox ID="ChkTaxType" runat="server" Text="Tax Type" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Status &nbsp; &nbsp; &nbsp;
                                    <asp:DropDownList ID="DDLStatus" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    Tax Type &nbsp; &nbsp;&nbsp; &nbsp;<asp:DropDownList ID="DDLTaxType" runat="server"
                                        OnSelectedIndexChanged="DDLTaxType_SelectedIndexChanged" Width="150" AutoPostBack="true">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    Main Class &nbsp;&nbsp;
                                    <asp:DropDownList ID="DDLMainClass" runat="server" Width="150" AutoPostBack="true"
                                        OnSelectedIndexChanged="DDLMainClass_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox ID="ChkService" runat="server" Text="Service Tax Applicable" />
                                </td>
                                <td>
                                    Sub Class &nbsp; &nbsp;
                                    <asp:DropDownList ID="DDLSubClass" runat="server" Width="150">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:CheckBox ID="ChkCost" runat="server" Text="Cost Center Effected" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="tab-content" id="TabAddress" runat="server">
                    <table class="tablecontent" style="width: 100%">
                        <tr>
                            <td class="headtd" colspan="4">
                                Address
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Name
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlName" runat="server">
                                </asp:DropDownList>
                                <asp:TextBox ID="txtAddName" runat="server" CssClass="input" Width="194px"></asp:TextBox>
                            </td>
                            <td colspan="2">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td style="vertical-align: top;">
                                Address
                            </td>
                            <td>
                                <asp:TextBox ID="txtAddress1" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                            </td>
                            <td colspan="2">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <asp:TextBox ID="txtAddress2" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                            </td>
                            <td colspan="2">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <asp:TextBox ID="txtAddress3" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Place
                            </td>
                            <td>
                                <asp:TextBox ID="txtAddPlace" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                            </td>
                            <td>
                                Pincode
                            </td>
                            <td>
                                <asp:TextBox ID="txtPin" runat="server" CssClass="input" MaxLength="6" Width="250px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                State
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlState" runat="server">
                                </asp:DropDownList>
                            </td>
                            <td>
                                Country
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlCountry" runat="server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Phone
                            </td>
                            <td>
                                <asp:TextBox ID="txtPhone" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                            </td>
                            <td>
                                Fax
                            </td>
                            <td>
                                <asp:TextBox ID="txtFax" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Email
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmail" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="revEmail" runat="server" ControlToValidate="txtEmail"
                                    ErrorMessage="*" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                            </td>
                            <td>
                                Website
                            </td>
                            <td>
                                <asp:TextBox ID="txtWebsite" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="revWebsite" runat="server" ControlToValidate="txtWebsite"
                                    ErrorMessage="*" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="tab-content" id="TabDeliveryAdress" runat="server">
                    <div style="margin-left: 20px; margin-bottom: 5px;">
                        <asp:CheckBox ID="chk" runat="server" onclick="selectaddress();" Text="Same as address" />
                    </div>
                    <div style="clear: both;">
                    </div>
                    <div style="margin-left: 20px; margin-top: 2px; width: 40%; float: left">
                        <table class="tablecontent" style="width: 100%">
                            <tr>
                                <td class="headtd" colspan="2">
                                    Delivery Address Details
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Name
                                </td>
                                <td>
                                    <asp:DropDownList ID="DDLDileveryName" runat="server">
                                    </asp:DropDownList>
                                    &nbsp;<asp:TextBox ID="txtDileveryName" CssClass="input" Width="184px" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="vertical-align: top">
                                    Address
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDileveryAddress1" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDileveryAddress2" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDileveryAddress3" runat="server" Width="250px" CssClass="input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDileveryAddress4" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Place
                                </td>
                                <td>
                                    <asp:TextBox ID="TxtDileveryPlace" runat="server" Width="250px" CssClass="input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Pincode
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDileveryPincode" runat="server" Width="250px" CssClass="inputnumber"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    State
                                </td>
                                <td>
                                    <asp:DropDownList ID="DDLDileveryState" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Country
                                </td>
                                <td>
                                    <asp:DropDownList ID="DDLDileveryCountry" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Phone
                                </td>
                                <td>
                                    <asp:TextBox ID="TxtDileveryPhone" runat="server" Width="250px" CssClass="input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Fax
                                </td>
                                <td>
                                    <asp:TextBox ID="TxtDileveryFax" runat="server" Width="250px" CssClass="input"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div style="margin-left: 45px; margin-top: 15px; width: 40%; float: left">
                        <table class="tablecontent" style="width: 100%">
                            <tr>
                                <td class="headtd" colspan="2">
                                    Registration Details
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    VAT TIN No.
                                </td>
                                <td>
                                    Date
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtVat" runat="server" CssClass="input" Width="70px"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDeliveryVatDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                    <asp:ImageButton ID="ImgDeliveryVat" runat="server" ImageUrl="~/Images/calendar.gif" />
                                    <ajaxToolkit:CalendarExtender ID="CalExtDeliveryvat" runat="server" TargetControlID="txtDeliveryVatDate"
                                        PopupButtonID="ImgDeliveryVat" Format="dd/MM/yyyy" Enabled="True" />
                                    <ajaxToolkit:MaskedEditExtender ID="DeliveryvatDateMask" runat="server" CultureName="en-GB"
                                        Enabled="True" TargetControlID="txtDeliveryVatDate" MaskType="Date" DisplayMoney="Left"
                                        AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                        CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                        CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                    </ajaxToolkit:MaskedEditExtender>
                                    <ajaxToolkit:MaskedEditValidator ID="DeliveryvatDateValmask" runat="server" ControlExtender="DeliveryvatDateMask"
                                        ControlToValidate="txtDeliveryVatDate" EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                        Display="Dynamic" EmptyValueBlurredText="*" ValidationGroup="CompanyInfo" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Inter State Tax Regn.
                                </td>
                                <td>
                                    Date
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtDeliveryInterState" runat="server" Width="80px" CssClass="input"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDeliveryInterStateDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                    <asp:ImageButton ID="ImgBtnInterState" runat="server" ImageUrl="~/Images/calendar.gif" />
                                    <ajaxToolkit:CalendarExtender ID="CalDateDeliveryInterState" runat="server" TargetControlID="txtDeliveryInterStateDate"
                                        PopupButtonID="ImgBtnInterState" Format="dd/MM/yyyy" Enabled="True" />
                                    <ajaxToolkit:MaskedEditExtender ID="DeliveryInterStateDateMask" runat="server" CultureName="en-GB"
                                        Enabled="True" TargetControlID="txtDeliveryInterStateDate" MaskType="Date" DisplayMoney="Left"
                                        AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                        CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                        CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                    </ajaxToolkit:MaskedEditExtender>
                                    <ajaxToolkit:MaskedEditValidator ID="DeliveryInterStateDateValmask" runat="server"
                                        ControlExtender="DeliveryInterStateDateMask" ControlToValidate="txtDeliveryInterStateDate"
                                        EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid" Display="Dynamic"
                                        EmptyValueBlurredText="*" ValidationGroup="CompanyInfo" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    CENVAT
                                </td>
                                <td>
                                    Date
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtDeliveryCENVAT" runat="server" Width="80px" CssClass="input"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDeliveryCENVATDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                    <asp:ImageButton ID="ImgBtnDeliveryCVNNETDate" runat="server" ImageUrl="~/Images/calendar.gif" />
                                    <ajaxToolkit:CalendarExtender ID="CalDateDeliveryCVNNET" runat="server" TargetControlID="txtDeliveryCENVATDate"
                                        PopupButtonID="ImgBtnDeliveryCVNNETDate" Format="dd/MM/yyyy" Enabled="True" />
                                    <ajaxToolkit:MaskedEditExtender ID="CVNNETDeliveryDateMask" runat="server" CultureName="en-GB"
                                        Enabled="True" TargetControlID="txtDeliveryCENVATDate" MaskType="Date" DisplayMoney="Left"
                                        AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                        CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                        CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                    </ajaxToolkit:MaskedEditExtender>
                                    <ajaxToolkit:MaskedEditValidator ID="CVNNETDeliveryDateValmask" runat="server" ControlExtender="CVNNETDeliveryDateMask"
                                        ControlToValidate="txtDeliveryCENVATDate" EmptyValueMessage="Date is Required"
                                        InvalidValueMessage="Date is Invalid" Display="Dynamic" EmptyValueBlurredText="*"
                                        ValidationGroup="CompanyInfo" ErrorMessage="AccountStartValmask" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div style="clear: both;">
                    </div>
                </div>
                <div class="tab-content" id="ContactsTabs" runat="server">
                    <div style="margin: 15px 0px 0px 20px; width: 90%">
                        <table class="tablecontent" style="width: 100%">
                            <tr>
                                <td class="headtd" colspan="2">
                                    Contacts
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 25%">
                                    Contact Person
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactPerson" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Position
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactPosition" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Phone
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactPhone" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Mobile
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactMobile" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    E-mail
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactEmail" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Fax
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactFax" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Remarks
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactRemarks" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="tab-content" id="TabRegistrations1" runat="server">
                    <div style="margin: 15px 0px 0px 20px; width: 90%">
                        <table class="tablecontent" style="width: 100%">
                            <tr>
                                <td class="headtd" colspan="2">
                                    Registrations
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 25%">
                                    Permanent A/C No.
                                </td>
                                <td>
                                    <asp:TextBox ID="txtRegPAN" runat="server" CssClass="input"></asp:TextBox>
                                    <asp:TextBox ID="txtRegPANDate" Width="70px" runat="server" CssClass="input"></asp:TextBox>
                                    <asp:ImageButton ID="ImgBtnPermanantDate" runat="server" ImageUrl="~/Images/calendar.gif" />
                                    <ajaxToolkit:CalendarExtender ID="CalExtPermanant" runat="server" TargetControlID="txtRegPANDate"
                                        PopupButtonID="ImgBtnPermanantDate" Format="dd/MM/yyyy" Enabled="True" />
                                    <ajaxToolkit:MaskedEditExtender ID="PermanantDateMask" runat="server" CultureName="en-GB"
                                        Enabled="True" TargetControlID="txtRegPANDate" MaskType="Date" DisplayMoney="Left"
                                        AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                        CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                        CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                    </ajaxToolkit:MaskedEditExtender>
                                    <ajaxToolkit:MaskedEditValidator ID="PermanantDateValmask" runat="server" ControlExtender="PermanantDateMask"
                                        ControlToValidate="txtRegPANDate" EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                        Display="Dynamic" EmptyValueBlurredText="*" ErrorMessage="AccountStartValmask" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    PAN References
                                </td>
                                <td>
                                    <asp:TextBox ID="txtRegPanRef" runat="server" CssClass="input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Tax Deduction No.
                                </td>
                                <td>
                                    <asp:TextBox ID="txtRegTaxDeduction" runat="server" CssClass="input"></asp:TextBox>
                                    <asp:TextBox ID="txtRegTaxDeductionDate" Width="70px" runat="server" CssClass="input"></asp:TextBox>
                                    <asp:ImageButton ID="ImgBtnTaxDeduction" runat="server" ImageUrl="~/Images/calendar.gif" />
                                    <ajaxToolkit:CalendarExtender ID="CalExtTaxDeduction" runat="server" TargetControlID="txtRegTaxDeductionDate"
                                        PopupButtonID="ImgBtnTaxDeduction" Format="dd/MM/yyyy" Enabled="True" />
                                    <ajaxToolkit:MaskedEditExtender ID="TaxDeductionDateMask" runat="server" CultureName="en-GB"
                                        Enabled="True" TargetControlID="txtRegTaxDeductionDate" MaskType="Date" DisplayMoney="Left"
                                        AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                        CultureDateFormat="DMY" CultureDatePlaceholder="/">
                                    </ajaxToolkit:MaskedEditExtender>
                                    <ajaxToolkit:MaskedEditValidator ID="TaxDeductionDateValmask" runat="server" ControlExtender="TaxDeductionDateMask"
                                        ControlToValidate="txtRegTaxDeductionDate" EmptyValueMessage="Date is Required"
                                        InvalidValueMessage="Date is Invalid" Display="Dynamic" EmptyValueBlurredText="*"
                                        ErrorMessage="AccountStartValmask" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    VAT TIN No.
                                </td>
                                <td>
                                    <asp:TextBox ID="txtRegVAT" runat="server" CssClass="input"></asp:TextBox>
                                    <asp:TextBox ID="txtRegVATDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                    <asp:ImageButton ID="ImgBtnvat" runat="server" ImageUrl="~/Images/calendar.gif" />
                                    <ajaxToolkit:CalendarExtender ID="CalExtvat" runat="server" TargetControlID="txtRegVATDate"
                                        PopupButtonID="ImgBtnvat" Format="dd/MM/yyyy" Enabled="True" />
                                    <ajaxToolkit:MaskedEditExtender ID="vatDateMask" runat="server" CultureName="en-GB"
                                        Enabled="True" TargetControlID="txtRegVATDate" MaskType="Date" DisplayMoney="Left"
                                        AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                        CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                        CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                    </ajaxToolkit:MaskedEditExtender>
                                    <ajaxToolkit:MaskedEditValidator ID="vatDateValmask" runat="server" ControlExtender="vatDateMask"
                                        ControlToValidate="txtRegVATDate" EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                        Display="Dynamic" EmptyValueBlurredText="*" ErrorMessage="AccountStartValmask" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Inter State Tax Regn.
                                </td>
                                <td>
                                    <asp:TextBox ID="txtRegInterState" runat="server" CssClass="input"></asp:TextBox>
                                    <asp:TextBox ID="txtRegInterStateDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                    <asp:ImageButton ID="ImgBtnInterState1" runat="server" ImageUrl="~/Images/calendar.gif" />
                                    <ajaxToolkit:CalendarExtender ID="CalDateInterState" runat="server" TargetControlID="txtRegInterStateDate"
                                        PopupButtonID="ImgBtnInterState1" Format="dd/MM/yyyy" Enabled="True" />
                                    <ajaxToolkit:MaskedEditExtender ID="InterStateDateMask" runat="server" CultureName="en-GB"
                                        Enabled="True" TargetControlID="txtRegInterStateDate" MaskType="Date" DisplayMoney="Left"
                                        AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                        CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                        CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                    </ajaxToolkit:MaskedEditExtender>
                                    <ajaxToolkit:MaskedEditValidator ID="InterStateDateValmask" runat="server" ControlExtender="InterStateDateMask"
                                        ControlToValidate="txtRegInterStateDate" EmptyValueMessage="Date is Required"
                                        InvalidValueMessage="Date is Invalid" Display="Dynamic" EmptyValueBlurredText="*"
                                        ErrorMessage="AccountStartValmask" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Service Tax Regn No.
                                </td>
                                <td>
                                    <asp:TextBox ID="txtRegServicetax" runat="server" CssClass="input"></asp:TextBox>
                                    <asp:TextBox ID="txtRegServiceTaxDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                    <asp:ImageButton ID="ImgBtnServiceTax" runat="server" ImageUrl="~/Images/calendar.gif" />
                                    <ajaxToolkit:CalendarExtender ID="CalDateServicetax" runat="server" TargetControlID="txtRegServiceTaxDate"
                                        PopupButtonID="ImgBtnServiceTax" Format="dd/MM/yyyy" Enabled="True" />
                                    <ajaxToolkit:MaskedEditExtender ID="ServiceTaxDateMask" runat="server" CultureName="en-GB"
                                        Enabled="True" TargetControlID="txtRegServiceTaxDate" MaskType="Date" DisplayMoney="Left"
                                        AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                        CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                        CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                    </ajaxToolkit:MaskedEditExtender>
                                    <ajaxToolkit:MaskedEditValidator ID="ServiceTaxDateValmask" runat="server" ControlExtender="ServiceTaxDateMask"
                                        ControlToValidate="txtRegServiceTaxDate" EmptyValueMessage="Date is Required"
                                        InvalidValueMessage="Date is Invalid" Display="Dynamic" EmptyValueBlurredText="*"
                                        ErrorMessage="AccountStartValmask" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    CENVAT
                                </td>
                                <td>
                                    <asp:TextBox ID="txtRegCVNNET" runat="server" CssClass="input"></asp:TextBox>
                                    <asp:TextBox ID="txtRegCVNNETDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                    <asp:ImageButton ID="ImgBtnCVNNET" runat="server" ImageUrl="~/Images/calendar.gif" />
                                    <ajaxToolkit:CalendarExtender ID="CalDateCVNNET" runat="server" TargetControlID="txtRegCVNNETDate"
                                        PopupButtonID="ImgBtnCVNNET" Format="dd/MM/yyyy" Enabled="True" />
                                    <ajaxToolkit:MaskedEditExtender ID="CVNNETxDateMask" runat="server" CultureName="en-GB"
                                        Enabled="True" TargetControlID="txtRegCVNNETDate" MaskType="Date" DisplayMoney="Left"
                                        AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                        CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                        CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                    </ajaxToolkit:MaskedEditExtender>
                                    <ajaxToolkit:MaskedEditValidator ID="CVNNETDateValmask" runat="server" ControlExtender="CVNNETxDateMask"
                                        ControlToValidate="txtRegCVNNETDate" EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                        Display="Dynamic" EmptyValueBlurredText="*" ValidationGroup="CompanyInfo" ErrorMessage="AccountStartValmask" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Luxury Tax Regn No.
                                </td>
                                <td>
                                    <asp:TextBox ID="txtRegLuxury" runat="server" CssClass="input"></asp:TextBox>
                                    <asp:TextBox ID="txtRegLuxuryDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                    <asp:ImageButton ID="ImgBtnLuxury" runat="server" ImageUrl="~/Images/calendar.gif" />
                                    <ajaxToolkit:CalendarExtender ID="CalExtLuxury" runat="server" TargetControlID="txtRegLuxuryDate"
                                        PopupButtonID="ImgBtnLuxury" Format="dd/MM/yyyy" Enabled="True" />
                                    <ajaxToolkit:MaskedEditExtender ID="LuxuryDateMask" runat="server" CultureName="en-GB"
                                        Enabled="True" TargetControlID="txtRegLuxuryDate" MaskType="Date" DisplayMoney="Left"
                                        AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                        CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                        CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                    </ajaxToolkit:MaskedEditExtender>
                                    <ajaxToolkit:MaskedEditValidator ID="LuxuryDateValmask" runat="server" ControlExtender="LuxuryDateMask"
                                        ControlToValidate="txtRegLuxuryDate" EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                        Display="Dynamic" EmptyValueBlurredText="*" ErrorMessage="AccountStartValmask" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="tab-content" id="TabOtherDetails" runat="server">
                    <div style="margin: 15px 0px 0px 20px; width: 90%">
                        <table class="tablecontent" style="width: 100%">
                            <tr>
                                <td class="headtd" colspan="4">
                                    Other Details
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Credit Period
                                </td>
                                <td>
                                    <asp:TextBox ID="txtCreditPeriod" runat="server" CssClass="inputnumber" onKeyPress="return isNumberKey(this.id,event)"
                                        Text="0" MaxLength="3"></asp:TextBox>&nbsp;Days
                                </td>
                                <td>
                                    Credit Limit(Rs.)
                                </td>
                                <td>
                                    <asp:TextBox ID="txtCreditLimit" runat="server" CssClass="inputnumber" onKeyPress="return isNumberKey(this.id,event)"
                                        Text="0"> </asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblSalesPersonMain" runat="server"></asp:Label>
                                    <%--  <asp:LinkButton ID="btnSalePerson" runat="server"></asp:LinkButton>--%>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlSalePerson" runat="server" Width="155px">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:Label ID="lblPriceGroup" runat="server" Text="Price Group"></asp:Label>
                                    <%--<asp:LinkButton ID="btnPriceGroup" runat="server" Text="Price Group"></asp:LinkButton>--%>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlPriceGroup" runat="server" Width="155px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="headtd" colspan="4">
                                    Tax Group
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Purchase
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlPurchase" runat="server" Width="155px" OnSelectedIndexChanged="ddlPurchase_SelectedIndexChanged"
                                        AutoPostBack="true">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    Sales
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlSales" runat="server" Width="155px" OnSelectedIndexChanged="ddlSales_SelectedIndexChanged"
                                        AutoPostBack="true">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;
                                </td>
                                <td colspan="3">
                                    <asp:CheckBox ID="chkApplyTCS" runat="server" Text="Apply TCS" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="tab-content" id="TabTermsCondition" runat="server">
                    <table class="tablecontent" style="width: 100%">
                        <tr>
                            <td class="headtd">
                                Terms & Condition
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:ListBox ID="lstTermCondition" runat="server" SelectionMode="Multiple" Width="95%"
                                    Height="150px"></asp:ListBox>
                                <%--<asp:TextBox ID="txtTermsCondition" Width="100%" TextMode="MultiLine" Height="90px" MaxLength="100"  runat="server" CssClass="input"></asp:TextBox> --%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="PnlView" runat="server" Visible="false">
            <div style="margin-left:5%; height:30px;width: 90%; background-color:#EEEEEE;">
                <table width="100%">
                    <tr>
                        <td style="width:5%;">
                            &nbsp;&nbsp;<asp:ImageButton ID="imgxl" runat="server" ImageUrl="~/Images/Excel.png" OnClick="imgxl_Click" />
                        </td>
                        <td style="width:15%;" align="right">
                           Customer Name
                        </td>
                        <td style="width:10%;">
                            <asp:TextBox ID="txtsearchCustomer" runat="server" CssClass="input" Width="180px"></asp:TextBox>
                        </td>
                        <td style="width:70%;" align="left">
                            <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="button" 
                                onclick="btnSearch_Click" />
                        </td>
                    </tr>
                </table>                
            </div>
            <div style="margin-left: 5%; margin-right: 5%; width: 90%;">
                <asp:GridView ID="GrdCustomer" runat="server" CssClass="gridview" Width="100%" RowStyle-CssClass="gridviewitem"
                    PagerStyle-CssClass="pgr" AutoGenerateColumns="false" AlternatingRowStyle-CssClass="gridview_alternate"
                    AllowPaging="true" PageSize="20" EmptyDataRowStyle-CssClass="emptyrow" EmptyDataText="No Record Exist!"
                    OnPageIndexChanging="GrdCustomer_PageIndexChanging" OnSelectedIndexChanged="GrdCustomer_SelectedIndexChanged"
                    DataKeyNames="LID" OnRowCommand="GrdCustomer_RowCommand">
                    <Columns>
                        <asp:TemplateField HeaderText="S.No." ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <%# Container.DataItemIndex+1 %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <table width="100%" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            Customer Name
                                        </td>
                                        <td>
                                            <asp:ImageButton ID="LinkButtonEmpName" runat="server" CommandName="Sort" CommandArgument="LNAME"
                                                ImageUrl="~/Images/sort.png" />
                                        </td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblCustomerName" runat="server" Text='<%#Bind("LNAME")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Alternate Name" DataField="LANAME" />
                        <asp:BoundField HeaderText="Group/Main Ledger" DataField="GNAME" />
                        <asp:BoundField HeaderText="Opening Balance" DataField="ACTOPENING" ItemStyle-HorizontalAlign="Right" />
                        <asp:TemplateField HeaderText="Details" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <a href="#" onclick="window.open('CustomerDetail.aspx?Lid=<%# DataBinder.Eval (Container.DataItem,"LID")%>','','width=800,height=600,toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes')">
                                    View</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField HeaderText="Edit" SelectText="<img src='../../../Menu/images/Edit_user.png'/>"
                            ShowHeader="True" ShowSelectButton="True" ItemStyle-HorizontalAlign="Center" />
                    </Columns>
                    <PagerStyle HorizontalAlign="Right" />
                </asp:GridView>
                <asp:GridView ID="grdCustomerDetails" runat="server" AllowPaging="false" Style="display: none;">
                </asp:GridView>
            </div>
        </asp:Panel>
    </div>
    </form>
</body>
</html>
